// https://leetcode.cn/problems/water-and-jug-problem/
// Created by ade on 2022/11/2.
//
#include <iostream>
#include <algorithm>

using namespace std;

class Solution {
public:
    bool canMeasureWater1(int jug1Capacity, int jug2Capacity, int targetCapacity) {
        if (jug1Capacity + jug2Capacity < targetCapacity) return false;
        if (jug1Capacity == 0) return jug2Capacity == targetCapacity;
        if (jug2Capacity == 0) return jug1Capacity == targetCapacity;
        return targetCapacity % __gcd(jug1Capacity, jug2Capacity) == 0;
    }

    bool canMeasureWater(int jug1Capacity, int jug2Capacity, int targetCapacity) {

    }

    // 3 (16, 32)
};

int main() {
    Solution so;
    so.canMeasureWater(19, 35, 2);
    return 0;
}